<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class PushConfigData extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        $data = [[
            'name' => 'Logo',
            'mark' => 'logo',
            'value' => '/storage/assets/logo.png',
        ], [
            'name' => 'Favicon',
            'mark' => 'favicon',
            'value' => '/storage/assets/favicon.png',
        ], [
            'name' => 'Login欢迎图片',
            'mark' => 'login_image',
            'value' => '/storage/assets/login_image.jpeg',
        ],[
            'name' => '网站标题',
            'mark' => 'title',
            'value' => '鹿和后台',
        ]];
        foreach ($data as $datum) {
            $config = new App\Models\Config();
            $config->name = $datum['name'];
            $config->mark = $datum['mark'];
            $config->value = $datum['value'];
            $config->save();
        }
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
